From c894e6dae793aef1b08bfd6b56e93b828e0cbf2e Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Wed, 3 Nov 2010 12:35:04 +0000 Subject: [PATCH] libxc: fix bounce buffers in xc_pm_get_cx_stat and xc_pm_get_pxstat We should bounce the buffers themselves, not the pointers to them! Error introduced by 22292:a1b39d2b9001 and reported by Yang Z Zhang. Signed-off-by: Ian Campbell Signed-off-by: Ian Jackson --- tools/libxc/xc_pm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/libxc/xc_pm.c b/tools/libxc/xc_pm.c index fd88c38b1f..590e15d623 100644 --- a/tools/libxc/xc_pm.c +++ b/tools/libxc/xc_pm.c @@ -46,8 +46,8 @@ int xc_pm_get_pxstat(xc_interface *xch, int cpuid, struct xc_px_stat *pxpt) { DECLARE_SYSCTL; /* Sizes unknown until xc_pm_get_max_px */ - DECLARE_NAMED_HYPERCALL_BOUNCE(trans, &pxpt->trans_pt, 0, XC_HYPERCALL_BUFFER_BOUNCE_BOTH); - DECLARE_NAMED_HYPERCALL_BOUNCE(pt, &pxpt->pt, 0, XC_HYPERCALL_BUFFER_BOUNCE_BOTH); + DECLARE_NAMED_HYPERCALL_BOUNCE(trans, pxpt->trans_pt, 0, XC_HYPERCALL_BUFFER_BOUNCE_BOTH); + DECLARE_NAMED_HYPERCALL_BOUNCE(pt, pxpt->pt, 0, XC_HYPERCALL_BUFFER_BOUNCE_BOTH); int max_px, ret; @@ -124,8 +124,8 @@ int xc_pm_get_max_cx(xc_interface *xch, int cpuid, int *max_cx) int xc_pm_get_cxstat(xc_interface *xch, int cpuid, struct xc_cx_stat *cxpt) { DECLARE_SYSCTL; - DECLARE_NAMED_HYPERCALL_BOUNCE(triggers, &cxpt->triggers, 0, XC_HYPERCALL_BUFFER_BOUNCE_BOTH); - DECLARE_NAMED_HYPERCALL_BOUNCE(residencies, &cxpt->residencies, 0, XC_HYPERCALL_BUFFER_BOUNCE_BOTH); + DECLARE_NAMED_HYPERCALL_BOUNCE(triggers, cxpt->triggers, 0, XC_HYPERCALL_BUFFER_BOUNCE_BOTH); + DECLARE_NAMED_HYPERCALL_BOUNCE(residencies, cxpt->residencies, 0, XC_HYPERCALL_BUFFER_BOUNCE_BOTH); int max_cx, ret; if( !cxpt || !(cxpt->triggers) || !(cxpt->residencies) ) -- 2.30.2